﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CarbonExchange.AmeeQuery;

namespace CarbonExchange.Tests.TestImplimentations
{
    public class AmeeCommand : IAmeeCommand
    {
        private IAmeeSettingsReader settings;

        public AmeeCommand()
        {
            settings = new CarbonExchange.AmeeQuery.AmeeSettingsReader();
        }

        public AmeeCommand(IAmeeSettingsReader settings)
        {
            this.settings = settings;
        }


        public bool Authenticate()
        {
            if ("gap".Equals(settings.GetUsername(), StringComparison.InvariantCultureIgnoreCase)
                && "g4p4m33".Equals(settings.GetUsername(), StringComparison.InvariantCultureIgnoreCase))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public bool ReAuthenticate()
        {
            return Authenticate();
        }

        public Newtonsoft.Json.Linq.JObject SendJsonGet(string url)
        {
            throw new NotImplementedException();
        }

        public System.Xml.Linq.XDocument SendXmlGet(string url)
        {
            throw new NotImplementedException();
        }

        public void Dispose()
        {
            throw new NotImplementedException();
        }


        public System.Xml.Linq.XDocument SendXmlUpdate(string url, Dictionary<string, string> data)
        {
            throw new NotImplementedException();
        }

        public System.Xml.Linq.XDocument SendXmlInsert(string url, string dataItemId, Dictionary<string, string> data)
        {
            throw new NotImplementedException();
        }

        public System.Xml.Linq.XDocument CreateProfile(string name)
        {
            throw new NotImplementedException();
        }

        #region IAmeeCommand Members


        public void SendXmlDelete(string p)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
